package com.pocket.insight.service;

import com.pocket.insight.controller.dto.*;
import com.pocket.insight.entity.Connection;
import com.pocket.insight.entity.Dataset;

import java.util.List;

/**
 * @author zhaozhile
 */
public interface ConnectionService {

    Connection.MetaConfig verify(ConnectionOptionsDto connectionOptionsDto);

    Connection save(Connection connection);

    List<Connection> list();

    void delete(Long id);

    Connection getById(Long id);

    List<PathTableNode> getPathTables(Connection connection, Boolean pathOnly,List<String> path);

    DatasetResultDto previewDataAndSchema(Connection connection, Dataset dataset, SqlParam sqlParam);

}
